#include "../include/Equation.h"

double f(double x)
{
    return x - tan(x);
}

double g(double x)
{
    return 1 + 1 / (cos(x) * cos(x));
}

int main()
{
    cout << "(1):" << endl;
    Newton solver(f, g);
    cout << solver.solve(4.5, 4.5) << endl;
    cout << f(solver.solve(4.5, 4.5)) << endl;

    cout << endl;
    cout << "(2):" << endl;
    cout << solver.solve(7.7, 7.7) << endl;
    cout << f(solver.solve(7.7, 7.7)) << endl;

    return 0;
}